package com.atde._03_creational_design_patterns.fcatory.absfactory.pizzastore.order;


import com.atde._03_creational_design_patterns.fcatory.absfactory.pizzastore.pizza.BJCheesePizza;
import com.atde._03_creational_design_patterns.fcatory.absfactory.pizzastore.pizza.LDPepperPizza;
import com.atde._03_creational_design_patterns.fcatory.absfactory.pizzastore.pizza.Pizza;

/**
 * @BelongsProject: hsp_java_design_mode
 * @BelongsPackage: com.atde._03_creational_design_patterns.fcatory.absfactory.pizzastore.order
 * @Author: Del
 * @CreateTime: 2025-06-03  01:02
 * @Description: 抽象工厂实现 --- 实现层 ---  创建北京的披萨工厂
 * @Version: 1.0
 */
public class BJFactory implements AbsFactory {
    @Override
    public Pizza createPizza(String orderType) {
         Pizza pizza = null;
         if ( orderType.equals("cheese")) {
            pizza = new BJCheesePizza();
         } else if ( orderType.equals("pepper")) {
              pizza = new LDPepperPizza();
         }
         return pizza;
    }
}
